using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using DesktopWidgetApp.Shared;

namespace DesktopWidgetApp.Core.Data
{
    /// <summary>
    /// 任务仓储接口
    /// </summary>
    public interface ITaskRepository : IRepository<TaskItem, Guid>
    {
        /// <summary>
        /// 根据状态获取任务
        /// </summary>
        /// <param name="status">任务状态</param>
        /// <returns>任务列表</returns>
        Task<IEnumerable<TaskItem>> GetByStatusAsync(TaskStatus status);

        /// <summary>
        /// 根据优先级获取任务
        /// </summary>
        /// <param name="priority">优先级</param>
        /// <returns>任务列表</returns>
        Task<IEnumerable<TaskItem>> GetByPriorityAsync(Priority priority);

        /// <summary>
        /// 获取截止日期前的任务
        /// </summary>
        /// <param name="dueDate">截止日期</param>
        /// <returns>任务列表</returns>
        Task<IEnumerable<TaskItem>> GetByDueDateAsync(DateTime dueDate);

        /// <summary>
        /// 根据标签获取任务
        /// </summary>
        /// <param name="tag">标签</param>
        /// <returns>任务列表</returns>
        Task<IEnumerable<TaskItem>> GetByTagAsync(string tag);
    }
}